home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
5_6.lha
/
5_6
/
5_6test.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
473b
|
28 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include "char_queue.h"
include <stream.h>
har array[] = "this is a test";
ain()
char_queue c(100);
for (char *a = array; *a; a++)
{
char x = *a;
cout << "adding " << chr(x) << "\n";
c.enqueue(x);
}
while (!c.emptyQ())
{
char x = c.dequeue();
cout << "got " << chr(x) << "\n";
}
return 0;